projects
/
feed
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44ef604
)
strongswan: check return value instead of output
author
Stijn Tintel
<
[email protected]
>
Tue, 1 Aug 2017 01:29:45 +0000
(
03:29
+0200)
committer
Stijn Tintel
<
[email protected]
>
Mon, 7 Aug 2017 18:19:18 +0000
(20:19 +0200)
When the strongswan service is running, `ipsec status` returns 0. Check
the return value instead of checking its output.
While at it, remove the [[ ]] bashism, use rereadall instead of
(reread)secrets, and move it inside the if statement.
Signed-off-by: Stijn Tintel <
[email protected]
>
net/strongswan/files/ipsec.init
patch
|
blob
|
history
diff --git
a/net/strongswan/files/ipsec.init
b/net/strongswan/files/ipsec.init
index af838a82347c74a3c6aa0d052680cc8be4d91454..0bbec766cf54fb208c7a4210550616555a85b98f 100644
(file)
--- a/
net/strongswan/files/ipsec.init
+++ b/
net/strongswan/files/ipsec.init
@@
-331,8
+331,8
@@
restart() {
reload() {
prepare_env
- i
psec secrets
- if [[ ! -z "$(ipsec status)" ]]; then
+ i
f ipsec status > /dev/null 2>&1; then
+ ipsec rereadall
ipsec reload
else
ipsec start